package org.jeecg.modules.param.area.service;

import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.param.area.dto.BikeSysAreaTree;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.exception.JeecgBootException;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.modules.param.area.entity.BikeSysArea;
import org.jeecg.modules.param.area.entity.BikeSysUserArea;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @Description: bike_sys_area
 * @Author: 月月鸟
 * @Date:   2021-05-18
 * @Version: V1.0
 */
public interface IBikeSysAreaService extends IService<BikeSysArea> {

	/**根节点父ID的值*/
	public static final String ROOT_PID_VALUE = "0";

	/**树节点有子节点状态值*/
	public static final String HASCHILD = "1";

	/**树节点无子节点状态值*/
	public static final String NOCHILD = "0";

	/**新增节点*/
	String addBikeSysArea(BikeSysArea bikeSysArea);
	/**新增校验*/
	String addCheck(BikeSysArea bikeSysArea);
	/**修改节点*/
	void updateBikeSysArea(BikeSysArea bikeSysArea) throws JeecgBootException;

	/**删除节点*/
	Result<?> deleteBikeSysArea(String id) throws JeecgBootException;

	/**查询所有数据，无分页*/
    List<BikeSysArea> queryTreeListNoPage(QueryWrapper<BikeSysArea> queryWrapper);

    //获取所有父级名称
    List<BikeSysArea> getFatherNameList(BikeSysArea bikeSysArea,int type);

    //查询区-网点树结构
	List<BikeSysArea> getSiteTree(BikeSysUserArea bikeSysUserArea);
	//查询区域-树结构
	List<BikeSysArea> getOrganizationTree(BikeSysArea bikeSysArea,int type);

	List<BikeSysArea> getReqTree(List<BikeSysArea> list);

	void addAreaUser(LoginUser sysUser, String toString);


	Result<?> importExcel(HttpServletRequest request, HttpServletResponse response);

	List<BikeSysArea> getExportXlsList(BikeSysArea bikeSysArea);
}
